Conversation
```cmake
o execute_process instead of a single one" OFF)
if(USE_TWO_EXECUTE)
execute_process(
COMMAND echo "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}"
COMMAND "${CMAKE_COMMAND}" -E make_directory "bin"
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E create_symlink
"../OpenStudioApp.app/Contents/MacOS/openstudio"
"bin/openstudio"
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
)
else()
execute_process(
COMMAND echo "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}"
COMMAND "${CMAKE_COMMAND}" -E make_directory "bin"
COMMAND "${CMAKE_COMMAND}" -E create_symlink
"../OpenStudioApp.app/Contents/MacOS/openstudio"
"bin/openstudio"
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
)
endif()
```
```shell
for i in {0..20}; do rm -Rf bin && cmake -DUSE_TWO_EXECUTE:BOOL=OFF . || (echo "FAILED" && break); done
for i in {0..20}; do rm -Rf bin && cmake -DUSE_TWO_EXECUTE:BOOL=ON . || (echo "FAILED" && break); done
```
jmarrec
commented
Sep 2, 2024
Comment on lines
+475
to
+481
|
|
||
| COMMAND_ECHO STDOUT | ||
| COMMAND_ERROR_IS_FATAL ANY | ||
| ) | ||
|
|
||
| # We break it into two `execute_process`es so that there is no race condition between the make_directory above and the create_symlink below | ||
| execute_process( |
macumber
approved these changes
Sep 2, 2024
Collaborator
|
Nice! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cf #727 (comment)
I can reproduce the error even locally on Ubuntu: